package com.example.flshtarvel.vo;
import com.example.flshtarvel.entity.Article;
import com.example.flshtarvel.entity.Image;
import com.example.flshtarvel.entity.Tag;
import java.util.List;

public class RouteVo implements Comparable {
    private String mesTypeId;          //信息分类id
    private String routeId;            //路线id
    private String routeName;          //路线名称
    private String schedule;            //行程
    private int likeNum;                //点赞数
    private String tagId;          //标签id

    private String tagName;
    private List<List<Article>> scheduleList; //信息list
    private List<Tag> tagList;//标签list
    private List<Image> imageList;
    private int likeCount;           //点赞数
    private int collectCount;       //收藏数



    private int grade=1;      //匹配度




    public void setGrade(int grade) {
        this.grade = grade;
    }

    public int getGrade() {
        return grade;
    }

    public void gradeAdd(){
        grade++;
    }



    public int getLikeCount() {
        return likeCount;
    }

    public int getCollectCount() {
        return collectCount;
    }

    public void setLikeCount(int likeCount) {
        this.likeCount = likeCount;
    }

    public void setCollectCount(int collectCount) {
        this.collectCount = collectCount;
    }

    public String getRouteId() {
        return routeId;
    }

    public String getRouteName() {
        return routeName;
    }

    public String getSchedule() {
        return schedule;
    }

    public int getLikeNum() {
        return likeNum;
    }


    public List<List<Article>> getScheduleList() {
        return scheduleList;
    }

    public void setRouteId(String routeId) {
        this.routeId = routeId;
    }

    public void setRouteName(String routeName) {
        this.routeName = routeName;
    }

    public void setSchedule(String schedule) {
        this.schedule = schedule;
    }

    public void setLikeNum(int likeNum) {
        this.likeNum = likeNum;
    }

    public String getTagId() {
        return tagId;
    }

    public String getTagName() {
        return tagName;
    }

    public void setScheduleList(List<List<Article>> scheduleList) {
        this.scheduleList = scheduleList;
    }

    public void setTagId(String tagId) {
        this.tagId = tagId;
    }

    public void setTagName(String tagName) {
        this.tagName = tagName;
    }
    public void setTagList(List<Tag> tagList) {
        this.tagList = tagList;
    }

    public List<Tag> getTagList() {
        return tagList;
    }

    public String getMesTypeId() {
        return mesTypeId;
    }

    public void setMesTypeId(String mesTypeId) {
        this.mesTypeId = mesTypeId;
    }

    public void setImageList(List<Image> imageList) {
        this.imageList = imageList;
    }

    public List<Image> getImageList() {
        return this.imageList;
    }
//    @Override
//    public String toString() {
//        System.out.println("to");
//        return this.routeId;
//    }


    //降序
    @Override
    public int compareTo(Object o){
        RouteVo route = (RouteVo) o;
        if(this.grade>route.getGrade()){
            return -1;
        }else if(this.grade<route.getGrade()){
            return 1;
        }else{
            return 0;
        }
    }

    @Override
    public boolean equals(Object obj){
        if (this == obj){
            return true;
        }
        if (obj == null){
            return false;
        }
        if (getClass() != obj.getClass()){
            return false;
        }
        RouteVo routeVo = (RouteVo) obj;
        if (routeId.compareTo(routeVo.getRouteId())==0){
            return true;
        }else{
            return false;
        }
    }



}
